<html lang="en" dir="ltr">

<head>
  <meta charset="utf-8">
  <title></title>
  <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
  <script src="https://cdn.bootcss.com/vue/2.5.17-beta.0/vue.min.js"></script>
  <style media="screen">

  </style>
</head>
<body>
  <div id="view" >
    <cust></cust>
    <cust></cust>
    <cust num="6" v-on:change="change"></cust>
  </div>

  <script type="text/javascript">
      Vue.component('cust',{
          template:`<h1 @click="press"> hhhh1 {{num}} {{num2}}</h1>`,
          props:["num"],
          data:function() {
              return{
                num2:this.num
              }
          },
          methods:{
            press(){
              this.$emit("change","ss");
            }
          }
      })

      const vm = new Vue({
        el:'#view',
        methods:{
          change(v){
            alert(v,v)
          }
        }
      })
  </script>
</body>

</html>
